package cn.itcast.usermanager.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.itcast.usermanager.pojo.User;

public interface UserMapper {
	
	/**
	 * 查询所有用户
	 * @return
	 */
	public List<User> queryUserAll();
	/**
	 * 分页查询
	 * @return
	 */
	public List<User> queryUserByPage(@Param("start")int start,@Param("pageNum")int pageNum);
	
	/**
	 * 查询总条数
	 */
	public Long queryTotals();
	/**
	 * 添加用户
	 * @param user
	 */
	public int addUser(User user) throws Exception;
	
	/**
	 * 删除用户
	 * @param ids
	 * @return
	 */
	public int deleteUser(@Param("ids")String[] ids) throws Exception;
	/**
	 * 更新用户
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int updateUser(User user) throws Exception;
	
}
